<div>
    <a href="javascript:void(0);" class="button ui-state-default ui-corner-all" id="addnewmember" onclick="CompanyNewMember();" >
        <span class="ui-icon ui-icon-contact"></span>
        Add members
    </a>
</div>
<br />
<div id="contact_members">
    <?php foreach($models as $i=>$model): ?>
    <div id="member" class="ui-widget ui-widget-content ui-corner-all">
        <?php
        $this->widget('application.widgets.iconcontrol.iconcontrol',
            array('icons'=>array(
                    'member_close'=>array('icon'=>'ui-icon-closethick','click'=>'function(){confirmBox("Cant be delete","There is no need to delete this")}','title'=>'Add new members'),
                    ),
            ));
        ?>
<div class="simple">
<?php echo CHtml::activeLabelEx($model,"[$i]type"); ?>
<?php echo CHtml::activeDropDownList($model,"[$i]type",array(0=>'Manager',1=>'Sale person',2=>'Accounts',3=>'Export',4=>'Import',5=>'In charge'),array('style'=>'width:290px;')); ?>
</div>
    <div class="simple">
<?php echo CHtml::activeLabelEx($model,"[$i]person_name"); ?>
<?php echo CHtml::activeTextField($model,"[$i]person_name",array('size'=>35,'maxlength'=>250)); ?>
</div>

<div class="simple">
    
<?php echo CHtml::activeLabelEx($model,"[$i]tel"); ?>
<?php echo CHtml::activeTextField($model,"[$i]tel",array('size'=>35)); ?>
    </div>
    <div class="simple">
<?php echo CHtml::activeLabelEx($model,"[$i]fax"); ?>
<?php echo CHtml::activeTextField($model,"[$i]fax",array('size'=>35,'maxlength'=>20)); ?>
</div>

<div class="simple">
    
<?php echo CHtml::activeLabelEx($model,"[$i]mobile"); ?>
<?php echo CHtml::activeTextField($model, "[$i]mobile", array('size'=>35)); ?>
    </div>
    <div class="simple">
        <?php echo CHtml::activeLabelEx($model,"[$i]email"); ?>
        <?php echo CHtml::activeTextField($model,"[$i]email",array('size'=>35,'maxlength'=>254)); ?>
    
</div>
    </div>
    <br />
    <?php endforeach; ?>
</div>
